From: Daniel van Vugt Date: Wed, 17 Jun 2020 09:31:59 +0000 (+0800) Subject: st: Don't leak st_describe_actor strings X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~684^2^2~234 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8e05fa2728be2bb19ae1ea782ae1e5968b9e0fd0;p=gnome-shell.git st: Don't leak st_describe_actor strings Hopefully this code doesn't get hit much. And it does seem to be the only user of the function. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1319 --- diff --git a/src/st/st-widget.c b/src/st/st-widget.c index 615d5e477..9efffbd76 100644 --- a/src/st/st-widget.c +++ b/src/st/st-widget.c @@ -601,8 +601,11 @@ st_widget_get_theme_node (StWidget *widget) if (stage == NULL) { + g_autofree char *desc = st_describe_actor (CLUTTER_ACTOR (widget)); + g_critical ("st_widget_get_theme_node called on the widget %s which is not in the stage.", - st_describe_actor (CLUTTER_ACTOR (widget))); + desc); + return g_object_new (ST_TYPE_THEME_NODE, NULL); }